<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
        $where['email']="8888@qq.com";
        $Order = new \Org\Util\AVQuery("Courier");
        $avq = $Order->getFind($where);
        $uid = $avq->get("pwd");
        $info=M('Buyer_user')->where(array('openid'=>"oA7dTs8AIjKxqxfnDBOFNdVYTb2s"))->find();
        $this->_user = $info;
        $this->display();
    }
    public function hotsale(){
        if(IS_POST){
            $map['name'] = array('like',I('searchName'));
            $this->pname = I('searchName');
        }else{
            $map['isNice'] = 1;
        }
        $map['status'] = 1;
        $map['name'] = array('LIKE','%'.I('searchName').'%');
        $list = M('Product')->where($map)->limit(5)->select();
        for($i=0;$i<count($list);$i++){
            preg_match_all('/\["(.+?)\"(.+?)/', $list[$i]["picurlarray"], $arr4);
            $list[$i]['imgurl']=$arr4[1][0];
        }
        $this->assign('_list',$list);
        $this->display();
    }
}